#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	for (int i = 0;i < s.size();i++)
	{
		if (!isalpha(s[0]) && s[0]!='_')
		{
			printf("NO\n");
			return 0;
		}
		if (isdigit(s[i]) || isalpha(s[i]) || s[i] == '_')
		{
			;
		}
		
		else
		{
			printf("NO");
			return 0;
		}

	}
	printf("YES");

	return 0;
}